import 'package:dailypayagent/model/transitionlist.dart';
import 'package:dailypayagent/provider/view_state_refresh_list_model.dart';
import 'package:dailypayagent/service/wan_android_repository.dart';

class TransitionListModel extends ViewStateRefreshListModel<TransRecordList> {
  Transitionlist transitionlist;
  @override
  Future<List<TransRecordList>> loadData({int pageNum}) async {
    transitionlist = await WanAndroidRepository.fetchTransitionList(pageNum);
    return transitionlist.transRecordList;
  }
}

class TransitionListModelCopy
    extends ViewStateRefreshListModel<TransRecordList> {
  Transitionlist transitionlist;
  @override
  Future<List<TransRecordList>> loadData({int pageNum}) async {
    setBusy();
    transitionlist = await WanAndroidRepository.fetchTransitionList(pageNum);
    setIdle();
    return transitionlist.transRecordList;
  }
}
